Printer Objects
Each job object references two printer objects. One printer object specifies the output printer on which the document is printed. The other printer object defines the formatting printer that specifies how the document is formatted. A user chooses an output printer in the Print dialog box and a formatting printer in the Page Setup dialog box. When a job object is created, its output printer is the currently selected desktop printer, and the formatting printer is specified by the output printer's printer driver.Each printer object has six accessible properties, as shown in Figure 4-1. Note that, because a printer object is a private data structure, the order of the properties as shown in Figure 4-1 is completely arbitrary. Properties in italics indicate references to other objects.
The properties of a printer object are:
- Printer name. This property contains the name of the printer. A user specifies a printer by name in the Print dialog box. For example, a user could choose the printer "My Printer" from the list of available printers.
- Printer type. This property specifies the creator type of a printer. It is a 4-character signature that uniquely identifies a kind of printer. You are responsible for registering the printer type with Developer Technical Support at Apple Computer. An example of a printer type is 'LWRW' for a LaserWriter.
- Printer driver name. This property specifies the name of the printer driver to which the job is printed. A user specifies a printer driver from the Chooser if the desired printer is not already on the desktop.
- Printer driver type. This property specifies the kind of printer driver. Table 4-1 shows some printer driver types provided by QuickDraw GX.
- View device list. This property contains a list of references to the view devices associated with a printer. Each view device specifies a print resolution (dots-per-inch) and color space (for example, CMYK or a grayscale space) that is supported by the printer. For more information about the relationship between printer objects and view devices, see the section "Printer View Devices" beginning on page 4-8.
- Job. This property contains a reference to a job object. Through this reference, you can access a job object associated with a printer object. The job object is discussed in the chapter "Core Printing Features" in this book.
Table 4-1 Printer driver types
Table 4-1 shows the printer driver types defined by QuickDraw GX. Do not make assumptions about the kinds of service provided by a printer driver based on its type alone. For example, two PostScript drivers may be subtly different.
- Note
- You are responsible for registering your printer driver type with Developer Technical Support.
![]()
Printer View Devices
A printer object's view device list specifies the resolutions and color spaces that can be used with a printer. These view devices are created by the printer driver. Your application can access, but not change, these characteristics. The printer's resolution is stored in the view device's mapping property as the scaling factor. The printer's color space is stored in the bitmap shape that represents the imageable area of the device. A view device object contains other properties as well; however, these properties are not used in printing. For more information about view device objects, see the view-related objects chapter of Inside Macintosh: QuickDraw GX Objects.For example, the LaserWriter IISC GX driver creates a view device list with only one view device, because the printer supports only one color space, black-and-white, and one resolution, 300 dots-per-inch. The view device's mapping property specifies a scaling factor of 4.17, both horizontally and vertically, to achieve the 300 dots-per-inch resolution. The scaling factor is determined by dividing the printer's resolution, 300 dots-per-inch, by 72, which represents the resolution when the scaling factor is 1.
As another example, the ImageWriter II GX printer driver supports printing at two resolutions in each of two color spaces:
The driver creates a view device list with four view device references. The printer driver sets up the mapping property in each view device to specify the correct scaling factor. For an example of how to obtain the scaling factor, see the section"Determining a Printer's Resolution" on page 4-26.
- 144 dpi, with a 4-bit indexed CMYK (cyan, magenta, yellow, black) color space
- 144 dpi, 1-bit indexed color space
- 72 dpi, with a 4-bit indexed CMYK color space
- 72 dpi, 1-bit indexed color space
- Note
- A printer driver inherits a view device for a 72 dpi, 24-bit RGB color space from QuickDraw GX and modifies the list as necessary to include the view devices that the driver actually supports. For more information about writing a printer driver, see the printer driver chapter of Inside Macintosh: QuickDraw GX Printing Extensions and Drivers.
![]()
Color Matching for Printers
QuickDraw GX provides a color profile object that is used to specify color-matching information for a printer. The color profile object is discussed in the color and color-related objects chapter of Inside Macintosh: QuickDraw GX Objects. Your application can access the color profile object associated with a printer driver or a particular page of output or set these color profile objects using the following functions:
Function Purpose GXFindPrinterProfile
Determine the color profile for a printer GXFindFormatProfile
Determine the color profile for a format object GXSetPrinterProfile
Set the color profile for a printer GXSetFormatProfile
Set the color profile for a format object For more information about these functions, see "Color Profile Functions" beginning on page 4-84. For an example of retrieving the color profile and color space from a view device, see "Retrieving the Color Profile and Color Space for a Printer" on page 4-27.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help